package cn.com.idmy.auth;


import org.jetbrains.annotations.NotNull;

import java.util.List;
import java.util.function.Consumer;
import java.util.function.Function;

public interface AuthFilter {
    @NotNull AuthFilter addInclude(@NotNull String... paths);

    @NotNull AuthFilter addExclude(@NotNull String... paths);

    @NotNull AuthFilter setIncludes(@NotNull List<String> paths);

    @NotNull AuthFilter setExcludes(@NotNull List<String> paths);

    @NotNull AuthFilter setAuth(@NotNull Consumer<Object> auth);

    @NotNull AuthFilter setError(@NotNull Function<Throwable, Object> error);

    @NotNull AuthFilter setBeforeAuth(@NotNull Consumer<Object> beforeAuth);
}
